home *** CD-ROM | disk | FTP | other *** search
- Path: anvil.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Newbie doesn't understand compiler error
- Date: 1 Mar 1996 18:42:53 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4h8cjdINNgnf@anvil.ugrad.cs.ubc.ca>
- References: <Pine.SUN.3.91.960301153010.11258B-100000@pioneer.uspto.gov>
- NNTP-Posting-Host: anvil.ugrad.cs.ubc.ca
-
- In article <Pine.SUN.3.91.960301153010.11258B-100000@pioneer.uspto.gov>,
- Max Schubert <schubert@pioneer.uspto.gov> wrote:
- >I have just started to work with two different learning C books. They
- >both have programs to copy and compile as I go along. Twice I have
- >received this error from cc when attempting to compile two separate
- >programs on SunOS 4.1.2:
- >
- >#include <stdio.h>
- >
- >void do_heading(char *filename);
- >
- >int line, page;
- >
- >main( int argv, char *argc[] ) <<- Compiler states "Syntax error at or near
- >{ word type char."
-
- The SunOS cc compiler is not ANSI. It won't accept ANSI function parameter
- declarations. You have three choices: use unprotoize on your code, use GCC, or
- start coding ``old-style'':
-
- int main(argv, argc)
- int argv;
- char **argc;
- {
- /* and so forth */
- }
-
-
-
-
- >Do I need to update my compiler?
- >
- > ANY help would be greatly appreciated.
- >
- > Thanks,
- > Max
- >
- >-------------------------------------------------------------------------------
- >Max Schubert U.S. Patent and Trademark Office
- >STAR Database Administrator schubert@uspto.gov or
- >Scientific and Technical Information Center schubert@pioneer.uspto.gov
- >-------------------------------------------------------------------------------
- >
- >
-
-
- --
-
-